path(pathdef);
m=[pathsep pathdef pathsep];
x=find(m==pathsep);
n=char([]);
for i=1:length(x)-1
    if strmatch(matlabroot,m(x(i)+1:x(i+1)))
        n=[n m(x(i)+1:x(i+1))];
    end
    if strfind(m(x(i)+1:x(i+1)),'Psychtoolbox')>0
        n=[n m(x(i)+1:x(i+1))];
    end
end
matlabpath(n);
addpath(genpath('E:\_User\_bcoe\matlab7p10'))
cd('E:\_User\_bcoe\matlab7p10');